import { aggregationService } from '@/api/aggregation'

// 业务员银行卡管理相关API

/**
 * 获取银行卡详情
 * @param {number} userId 用户ID
 * @returns {Promise}
 */
export function getBankCardDetail(userId) {
  return aggregationService({
    url: '/agg/card/getInfo',
    method: 'get',
    params: { userId }
  })
}

/**
 * 添加银行卡
 * @param {Object} data 银行卡信息
 * @returns {Promise}
 */
export function addBankCard(data) {
  return aggregationService({
    url: '/agg/card/add',
    method: 'post',
    data: data
  })
}

/**
 * 编辑银行卡
 * @param {Object} data 银行卡信息
 * @returns {Promise}
 */
export function editBankCard(data) {
  return aggregationService({
    url: '/agg/card/edit',
    method: 'post',
    data: data
  })
}

/**
 * 获取账户详情
 * @param {number} userId 用户ID
 * @returns {Promise}
 */
export function getAccountDetail(userId) {
  return aggregationService({
    url: '/agg/account/getInfo',
    method: 'get',
    params: { userId }
  })
}
